<template>
  <div>
    <h1>计算器</h1>
    <h2>{{ num }}</h2>
    <button @click="num++">+</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      num: 1,
    };
  },
  beforeCreate() {
    console.log('-----1、beforeCreate-----------');
  },
  created() {
    console.log('-----1、created-----------');
  },
  beforeMount() {
    console.log('-----1、beforeMount-----------');
  },
  mounted() {
    console.log('-----1、mounted-----------');
  },
  beforeUpdate() {
    console.log('-----1、beforeUpdate-----------');
  },
  updated() {
    console.log('-----1、updated-----------');
  },
  beforeDestroy() {
    console.log('-----1、beforeDestroy-----------');
  },
  destroyed() {
    console.log('-----1、destroyed-----------');
  },
  deactivated(){
     console.log('-----1、deactivated-----------');
  },
  activated(){
     console.log('-----1、activated-----------');
  }
};
</script>

<style>
</style>